<div class="modal-header">
    模板设置
    <i class="ec ec-close base-color pull-right cursor-pointer" title="关闭" ng-click="cancel()"></i>
</div>
<form name="printForm" class="form-horizontal padder-v edit-page" novalidate>
    <div class="form-group">
        <label class="control-label"><i>*</i> 模板名称：</label>
        <input type="text" name="TemplateName" class="form-control" value="formData.TemplateName" ng-model="formData.TemplateName" required yb-focus/>
        <div class="msg-block"
             ng-show="printForm.TemplateName.$dirty || submitted">
            <div class="success-msg" ng-show="printForm.TemplateName.$valid&&!printForm.TemplateName.focused">
                <i class="ec ec-check-circle"></i>
            </div>
            <div class="error-msg"
                 ng-show="printForm.TemplateName.$error.required && ((printForm.TemplateName.$dirty && !printForm.TemplateName.focused) || submitted)">
                <i class="ec ec-times-circle"></i>必填项，请填写
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label" style="height: 80px">单据标题：</label>
        <div class="col-xs-8" style="line-height:35px">
            <div class="col-xs-12">
                <input type="radio" style="vertical-align: middle;margin-top: -1px;"
                       name="selectTitleMode" value="1" ng-model="formData.TitleMode" ng-checked="true">
                <span>{{printTitle}}</span>
            </div>
        </div>
        <div class="col-xs-8" style="line-height:35px">
            <div class="col-xs-12">
                <input type="radio" style="vertical-align: middle;margin-top: -1px;"
                       name="selectTitleMode" value="2" ng-model="formData.TitleMode">
                <span>{{orderName}}</span>
            </div>
        </div>
        <div class="col-xs-8" style="line-height:35px">
            <div class="col-xs-2">
                <input type="radio" style="vertical-align: middle;margin-top: -1px;"
                       name="selectTitleMode" value="0" ng-model="formData.TitleMode">
                <span> 自定义标题</span>
            </div>
            <input type="text" ng-model="formData.customTitle" class="form-control" ng-if="formData.TitleMode==0"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label"> 标题字体大小：</label>
        <select class="form-control pull-left" style="width: 100px;"
                ng-model="selectedHeadFontSize"  ng-options="fontSize for fontSize in HeadFontSizeLists">
        </select>
    </div>
    <div class="form-group">
        <label class="control-label"> 商品备注列：</label>
        <div style="line-height: 35px;float: left;" class="m-r">
            <input class="check-box-single" style="vertical-align: middle;margin-top: -1px;" type="checkbox" ng-model="formData.IsNote">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label"> 固定商品行数：</label>
        <div style="line-height: 35px;float: left;" class="m-r">
            <input class="check-box-single" style="vertical-align: middle;margin-top: -1px;" type="checkbox" ng-model="formData.IsPrintLine">
        </div>
        <input type="text" ng-model="formData.PrintLineNum" class="form-control m-r" style="width: 100px;" ng-disabled="!formData.IsPrintLine" yb-number-input min="1" max="14"/>
        <!--<span style="line-height: 35px;"></span>-->
    </div>
    <div class="form-group">
        <label class="control-label"> 单据页尾：</label>
        <textarea style="width:600px;height:80px;resize:none;" class="form-control" ng-model="formData.BottomMessage" ></textarea>
    </div>
    <div class="modal-footer text-right">
        <input class="check-box-single" ng-if="isEdit" type="checkbox" ng-model="formData.IsDefaultTemplate" ng-disabled="IsDefaultTemplateFlag"> <span ng-if="isEdit">默认模板</span>
        <button class="btn btn-md btn-primary m-l" ng-if="!isEdit" ng-click="addTemplate(printForm.$valid)">确定</button>
        <button class="btn btn-md btn-success m-l" ng-if="isEdit" ng-click="saveTemplate(printForm.$valid)">保存</button>
        <button class="btn btn-md btn-default" ng-click="cancel()">取消</button>
    </div>
</form>